import request from '@/utils/request'
export default{
  //1.章节列表
  getAllChapterVideo(chapterId){
    return request({
      // url: '/eduservice/teacher/pageTeacherCondition/'+current+"/"+limit,
      url: `/eduservice/chapter/getChapterVideo/${chapterId}`,
      method: 'get',
    })
  },
  //添加章节
  addChapter(chapter){
    return request({
      // url: '/eduservice/teacher/pageTeacherCondition/'+current+"/"+limit,
      url: `/eduservice/chapter/addChapter`,
      method: 'post',
      data: chapter
    })
  },
  //查找章节
  getChapterById(chapterId){
    return request({
      // url: '/eduservice/teacher/pageTeacherCondition/'+current+"/"+limit,
      url: `/eduservice/chapter/getChapter/${chapterId}`,
      method: 'get',
    })
  },
//修改章节
  updateChapter(chapter) {
    return request({
      url: `/eduservice/chapter/updateChapter`,
      method: `post`,
      data: chapter
    })
  },
  //删除章节
  deleteById(chapterId){
    return request({
      // url: '/eduservice/teacher/pageTeacherCondition/'+current+"/"+limit,
      url: `/eduservice/chapter/deleteById/${chapterId}`,
      method: 'delete',
    })
  },
}
